package com.flyox.game.fivetiger.bean;

import java.io.Serializable;

public class ChessOptions implements Serializable {

	private static final long serialVersionUID = -3051518444692994027L;
	private String whoFirst = CONSTS.SYS_SERVER_NAME;// 谁先走
	private boolean removeShape = false;// 可不可以拔成型的棋
	private int steptAddRemoveCount = 0;// 下棋阶段拔棋数量 0：按图形计算 1：1个
	private int timeCount = 0;// 超时时间 0：不计算超时 单位：秒
	private int styles = 0;// 默认画面风格，其他风格以后实现

	public ChessOptions(){
	}
	
	public ChessOptions(String whoFirst,boolean removeShape,int steptAddRemoveCount,int timeCount,int styles){
		this.whoFirst=whoFirst;
		this.removeShape=removeShape;
		this.steptAddRemoveCount=steptAddRemoveCount;
		this.timeCount=timeCount;
		this.styles=styles;
	}
	
	public String getWhoFirst() {
		return whoFirst;
	}

	public void setWhoFirst(String whoFirst) {
		this.whoFirst = whoFirst;
	}

	public boolean isRemoveShape() {
		return removeShape;
	}

	public void setRemoveShape(boolean removeShape) {
		this.removeShape = removeShape;
	}

	public int getSteptAddRemoveCount() {
		return steptAddRemoveCount;
	}

	public void setSteptAddRemoveCount(int steptAddRemoveCount) {
		this.steptAddRemoveCount = steptAddRemoveCount;
	}

	public int getTimeCount() {
		return timeCount;
	}

	public void setTimeCount(int timeCount) {
		this.timeCount = timeCount;
	}

	public int getStyles() {
		return styles;
	}

	public void setStyles(int styles) {
		this.styles = styles;
	}

	public Object clone(){
		return new ChessOptions(whoFirst,removeShape,steptAddRemoveCount,timeCount,styles);
	}
	
	public boolean equals(Object obj) {
		if (obj instanceof ChessOptions) {
			ChessOptions co = (ChessOptions) obj;
			if (whoFirst.equals(co.getWhoFirst()) && removeShape == co.isRemoveShape() && steptAddRemoveCount == co.getSteptAddRemoveCount() && timeCount == co.getTimeCount() && styles == co.getStyles()) {
				return true;
			}
		}
		return false;
	}
}
